<template>
  <div></div>
</template>

<script>
import { getQueryParam } from "@/utils/common";
import { loginup } from "@/api/login";
export default {
  name: "Loginup",
  data() {
    return {};
  },
  created: function () {
    var userName = getQueryParam("userName");
    loginup({ userName: userName }).then((res) => {
      this.$store
        .dispatch("UserValid", res)
        .then(() => {
          this.$router.push({ path: "/index" }).catch(() => {});
        })
        .catch(() => {
          if (this.captchaOnOff) {
            this.getCode();
          }
        });
    });
  },
  methods: {},
};
</script>

<style scoped lang="scss">
</style>
